import { httpCreate, CommonResponse } from './http';
const http = httpCreate('/srv/activity/label');
export const label = {
	// 获取所有的标签列表
	getLabelList<T>() {
		return http.get<T, CommonResponse>('/labelList');
	},
	// 新增自定义标签
	addLabel<T>(data: { labelName: string }) {
		return http.post<T, CommonResponse>('/addLabel', data);
	},
	// 删除标签
	deleteLabel<T>(labelId: number) {
		return http.delete<T, CommonResponse>(`/deleteLabel/${labelId}`);
	},
	// 更新直播间标签
	bindActivityLabel<T>(data: { activityId: number; bindLabelIds: Array<number>; deleteLabelIds: Array<number> }) {
		return http.post<T, CommonResponse>('/bindActivityLabel', data);
	},
	// 模糊查询标签
	searchLabelList<T>(params: { labelName: string }) {
		return http.get<T, CommonResponse>('/selectList', { params });
	},
};
